package com.smartcampusbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartcampusbackend.model.ClassCircleMember;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ClassCircleMemberMapper extends BaseMapper<ClassCircleMember> {
    
    // 检查用户是否已加入班级圈
    ClassCircleMember findByUserAndCircle(@Param("userId") Integer userId, @Param("classCircleId") Integer classCircleId);
    
    // 获取班级圈的所有成员
    List<ClassCircleMember> findByClassCircleId(@Param("classCircleId") Integer classCircleId);
    
    // 获取班级圈的成员数量
    int countByClassCircleId(@Param("classCircleId") Integer classCircleId);
    
    // 删除班级圈的所有成员
    int deleteByClassCircleId(@Param("classCircleId") Integer classCircleId);
} 